﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HRM.Model;

namespace HRM.Design
{
    public class DesignDeparmentService : IDepartmentService
    {
        public List<PhongBan> GetDepartments()
        {
            var list = new List<PhongBan>();

            for (int i = 1; i < 10; i++)
            {
                PhongBan pb = new PhongBan();
                pb.MaPhongBan = i;
                pb.TenPhongBan = "Phòng ban " + i.ToString();
                pb.DiaChi = "Địa chỉ " + i.ToString();
                pb.SDT = new Random().Next(1000000, 99999999).ToString();
                list.Add(pb);
            }
            return list;
        }

        public bool Add(PhongBan pb)
        {
            throw new NotImplementedException();
        }

        public bool Update(PhongBan pb)
        {
            throw new NotImplementedException();
        }

        public bool Delete(PhongBan pb)
        {
            throw new NotImplementedException();
        }

        public bool DeleteList(List<PhongBan> list)
        {
            throw new NotImplementedException();
        }

        public List<PhongBan> GetPaging(int pageIndex, int pageSize)
        {
            var list = new List<PhongBan>();

            for (int i = 1; i < 10; i++)
            {
                PhongBan pb = new PhongBan();
                pb.MaPhongBan = i;
                pb.TenPhongBan = "Phòng ban " + i.ToString();
                pb.DiaChi = "Địa chỉ " + i.ToString();
                pb.SDT = new Random().Next(1000000, 99999999).ToString();
                list.Add(pb);
            }
            return list;
        }

        public int GetNumberOfPages(int pageSize)
        {
            return 10;
        }


        public List<PhongBan> SearchBy(int mode, object input)
        {
            throw new NotImplementedException();
        }
    }
}
